﻿using BDShop.DAL;
using BDShop.Entities;
using System;
using System.Collections.Generic;
using IsolationLevel = System.Transactions.IsolationLevel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BDShop.Business
{
    public class TagService
    {
        public static List<Tag> GetListTagCacheModel()
        {
            List<Tag> lstTag = new List<Tag>();
            using (var context = new BDShopEntities(IsolationLevel.ReadUncommitted))
            {
                lstTag = context.Tags.Where(t=>t.IsCommon==true).Take(5).ToList();
            }

            return lstTag;
        }
    }
}
